home *** CD-ROM | disk | FTP | other *** search
/ PC Media 4 / PC MEDIA CD04.iso / share / prog / h2p120 / readme.txt < prev   
Encoding:
Text File  |  1994-05-31  |  1.8 KB  |  72 lines

  1. ReadMe.Txt for H2Pas
  2. ====================
  3.  
  4. H2Pas is a quick and dirty hack to convert C-Header files to Pascal units.
  5.  
  6. If you make modifications, please drop me a copy at
  7.   Peter Sawatzki, CompuServe 100031,3002
  8.  
  9. In it's current implementation (1.20) H2Pas does the following:
  10.  
  11. - convert structs
  12. - convert constant defines
  13. - convert procedure/function headers
  14. - 'convert' comments of style /* xxxx */ to { xxxx }
  15.   and comments of style // yyyy to { yyy }
  16. - make use of IMPort files to resolve DLL index entries
  17. - output C and Pascal code to verify correctness of C and Pascal
  18.   structure sizes
  19.  
  20. How to use and generate import files:
  21. -------------------------------------
  22.  
  23. if a EXEHDR type .IMP file is present for the DLL with information
  24. about the entry points of a function, H2Pas outputs an unit implementation
  25. section with entries of the form:
  26.  
  27.   Function Ctl3DEnabled;                  External 'CTL3D'    Index    5;
  28.  
  29. where the appropriate indices are resolved from information gathered
  30. from the .IMP file.
  31.  
  32. To generate the .IMP file for a DLL -say CTL3D.DLL- one must do the following:
  33.  
  34.   EXEHDR CTL3D.DLL >CTL3D.IMP
  35.  
  36.  
  37. How to execute H2Pas
  38. --------------------
  39.  
  40. Usage:
  41.  
  42. H2Pas Ctl3D.H Ctl3D.Pas [Ctl3D.Imp]
  43.  
  44. where Ctl3D.H is the source C header file,
  45.       Ctl3D.Pas is the destination pascal unit to be generated
  46.   and Ctl3D.Imp is an optional import file generated from EXEHDR
  47.  
  48. H2Pas.Ini
  49. ---------
  50.  
  51. currently H2Pas.Ini has two areas for customization:
  52.  
  53. [TypeMap]
  54. C-Type = Pascal-Type
  55.  
  56. maps a certain C-type to a Pascal type (see sample H2Pas.Ini)
  57.  
  58. [ModMap]
  59. modifier
  60.  
  61. a list of modifiers that H2Pas should ignore (see sample H2Pas.Ini)
  62.  
  63. written by
  64.  
  65.   Peter Sawatzki
  66.   Buchenhof 3
  67.   58091 Hagen / Germany
  68.   CompuServe: 100031,3002
  69.  
  70.  
  71.  
  72.